package net.luohuasheng.bee.proxy.core.utils.jpa.dto;

import net.luohuasheng.bee.proxy.core.enums.DataType;
import net.luohuasheng.bee.proxy.core.utils.jpa.annotation.TableLogic;

import javax.persistence.GenerationType;
import java.lang.reflect.Field;

/**
 * @author luohuasheng
 * @date 2020/4/13 08:42
 */
public class JpaColumnDto {
    private String name;
    private boolean pk;
    private boolean nullable;
    private boolean insertable;
    private boolean updatable;
    private DataType dataType;
    private TableLogic tableLogic;
    private Field field;
    private int length;
    private int scale;
    private GenerationType strategy;
    private String generator;
    private String comment;
    private String defaultValue;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public boolean isNullable() {
        return nullable;
    }

    public void setNullable(boolean nullable) {
        this.nullable = nullable;
    }

    public boolean isInsertable() {
        return insertable;
    }

    public void setInsertable(boolean insertable) {
        this.insertable = insertable;
    }

    public boolean isUpdatable() {
        return updatable;
    }

    public void setUpdatable(boolean updatable) {
        this.updatable = updatable;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }


    public int getScale() {
        return scale;
    }

    public void setScale(int scale) {
        this.scale = scale;
    }

    public GenerationType getStrategy() {
        return strategy;
    }

    public void setStrategy(GenerationType strategy) {
        this.strategy = strategy;
    }

    public String getGenerator() {
        return generator;
    }

    public void setGenerator(String generator) {
        this.generator = generator;
    }


    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }


    public DataType getDataType() {
        return dataType;
    }

    public void setDataType(DataType dataType) {
        this.dataType = dataType;
    }

    public boolean isPk() {
        return pk;
    }

    public void setPk(boolean pk) {
        this.pk = pk;
    }

    public Field getField() {
        return field;
    }

    public void setField(Field field) {
        this.field = field;
    }


    public TableLogic getTableLogic() {
        return tableLogic;
    }

    public void setTableLogic(TableLogic tableLogic) {
        this.tableLogic = tableLogic;
    }
}
